#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
游戏数据模型
包含考试、道具和事件数据
"""


class GameData:
    """游戏数据类"""
    
    # 考试数据
    EXAMS = [
        {"name": "通识选修课", "difficulty": 1, "knowledge_required": 10},
        {"name": "体育课", "difficulty": 2, "knowledge_required": 15},
        {"name": "计算机导论", "difficulty": 3, "knowledge_required": 25},
        {"name": "大学英语", "difficulty": 4, "knowledge_required": 35},
        {"name": "数据结构", "difficulty": 5, "knowledge_required": 50},
        {"name": "线性代数", "difficulty": 6, "knowledge_required": 70},
        {"name": "微积分", "difficulty": 7, "knowledge_required": 100}
    ]
    
    # 道具数据
    ITEMS = [
        {"id": "energy_drink", "name": "能量饮料", "effect": "energy", "value": 20, "description": "恢复20点精力"},
        {"id": "notes", "name": "笔记", "effect": "knowledge", "value": 15, "description": "增加15点知识"},
        {"id": "lucky_charm", "name": "幸运符", "effect": "luck", "value": 10, "description": "提高考试运气"},
        {"id": "coffee", "name": "咖啡", "effect": "energy", "value": 30, "description": "恢复30点精力，但会减少5点生命值"},
        {"id": "summary", "name": "重点总结", "effect": "knowledge", "value": 25, "description": "增加25点知识"},
        {"id": "study_group", "name": "学习小组", "effect": "knowledge", "value": 20, "description": "与其他同学一起学习，增加20点知识"},
        {"id": "allnighter", "name": "通宵达旦", "effect": "knowledge", "value": 35, "description": "通宵学习，增加35点知识，但消耗20点精力和10点生命值"},
        {"id": "tutor", "name": "私人导师", "effect": "knowledge", "value": 40, "description": "请私人导师辅导，增加40点知识"},
        {"id": "calculator", "name": "计算器", "effect": "exam", "value": 15, "description": "考试时使用，直接增加15分"},
        {"id": "extra_time", "name": "延时卡", "effect": "exam", "value": 10, "description": "延长考试时间，增加10分"}
    ]
    
    # 随机事件数据
    EVENTS = [
        {
            "name": "图书馆奇遇", 
            "description": "在图书馆遇到学霸，他愿意分享一些学习笔记",
            "effect": "knowledge",
            "value": 10,
            "probability": 0.15
        },
        {
            "name": "室友的慷慨", 
            "description": "室友看你学习辛苦，给你买了夜宵",
            "effect": "health",
            "value": 15,
            "probability": 0.1
        },
        {
            "name": "临时测验", 
            "description": "老师突然宣布小测验，你没有准备",
            "effect": "knowledge",
            "value": -10,
            "probability": 0.1
        },
        {
            "name": "网络崩溃", 
            "description": "选课系统崩溃，你无法选课，心情烦躁",
            "effect": "health",
            "value": -10,
            "probability": 0.05
        },
        {
            "name": "刷学长'真'题",
            "description": "有人提供学长的'真题'，要不要试试？",
            "effect": "special",
            "value": 0,
            "probability": 0.2
        }
    ]